package com.dating.libs.web.services.datingservice;


import java.io.Serializable;
import java.util.ArrayList;
import java.util.Hashtable;

import org.ksoap2.serialization.PropertyInfo;
import org.ksoap2.serialization.SoapObject;

public final class MatchingUser extends SoapObject implements Serializable{
    private int userID;

    private int result;

    private ArrayList<UserProperties> listProperties=null;

    public MatchingUser() {
        super("", "");
    }
    public void setUserID(int userID) {
        this.userID = userID;
    }

    public int getUserID(int userID) {
        return this.userID;
    }

    public void setResult(int result) {
        this.result = result;
    }

    public int getResult(int result) {
        return this.result;
    }

    public void addMatchingProperties(String name,String value) {
    	if(listProperties==null)
    		listProperties=new ArrayList<UserProperties>();
    	
    	UserProperties _t=new UserProperties();
    	_t.setName(name);
    	_t.setValue(value);
        this.listProperties.add(_t);
    }

    public ArrayList<UserProperties> getMatchingProperties() {
        return this.listProperties;
    }

    public int getPropertyCount() {
        return 3;
    }

    public Object getProperty(int __index) {
        switch(__index)  {
        case 0: return new Integer(userID);
        case 1: return new Integer(result);
        }
        return null;
    }

    public void setProperty(int __index, Object __obj) {
        switch(__index)  {
        case 0: userID = Integer.parseInt(__obj.toString()); break;
        case 1: result = Integer.parseInt(__obj.toString()); break;
        }
    }

	@SuppressWarnings("rawtypes")
	public void getPropertyInfo(int __index, Hashtable __table, PropertyInfo __info) {
        switch(__index)  {
        case 0:
            __info.name = "userID";
            __info.type = Integer.class; break;
        case 1:
            __info.name = "result";
            __info.type = Integer.class; break;
        case 2:
            __info.name = "matchingProperties";
        }
    }

}
